import junit.framework.Assert;
import org.junit.Before;
import org.junit.Test;

import static junit.framework.Assert.*;

/**
 * Created with IntelliJ IDEA.
 * User: stelian
 * Date: 12/8/12
 * Time: 2:43 PM
 * To change this template use File | Settings | File Templates.
 */
public class BoardTest {
    Board board;

    @Before
    public void setUp() throws Exception {
        board = new Board(5, 5);
        board.getBoard()[0][0] = true;
        board.getBoard()[0][1] = true;
    }

    @Test
    public void testSize() throws Exception {
        assertEquals(5, board.getBoard().length);

    }
    @Test
    public void  getNrOfNeighbours() throws Exception {

        assertEquals(2,board.getNrOfNeighbours(1,1));
        assertEquals(0,board.getNrOfNeighbours(5,5));
    }
}
